Skip to content

Comments

Fix AUTH_PROVIDERS environment variable not being read#3

Open
laurigates wants to merge 1 commit intocclloyd:mainfrom
laurigates:fix/auth-providers-env-variable
Open

Fix AUTH_PROVIDERS environment variable not being read#3
laurigates wants to merge 1 commit intocclloyd:mainfrom
laurigates:fix/auth-providers-env-variable

Conversation

@laurigates
Copy link

Summary

This PR fixes a bug where the AUTH_PROVIDERS configuration was incorrectly reading from process.env.LOGIN_DURATION instead of process.env.AUTH_PROVIDERS, causing authentication settings to be completely ignored.

Changes

  • Fixed src/env.ts line 43 to read from the correct environment variable
  • Added .filter((p) => p.trim()) to properly handle empty strings, allowing authentication to be disabled by setting AUTH_PROVIDERS to an empty value

Issue

When AUTH_PROVIDERS was set in the environment (e.g., AUTH_PROVIDERS: '' in docker-compose.yml), the value was ignored and the default 'discord,oidc' was always used instead. This made it impossible to disable authentication as documented.

Testing

Tested with AUTH_PROVIDERS: '' in docker-compose.yml - authentication is now properly disabled and the API is accessible without tokens.

🤖 Generated with Claude Code

The AUTH_PROVIDERS configuration was incorrectly reading from
process.env.LOGIN_DURATION instead of process.env.AUTH_PROVIDERS,
causing authentication settings to be ignored.

Additionally, empty strings are now properly filtered to allow
disabling authentication by setting AUTH_PROVIDERS to an empty value.

Fixes authentication bypass when AUTH_PROVIDERS is set to empty string.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant